/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


turbine
{
    type            crossFlowTurbineALSource;
    active          on;

    crossFlowTurbineALSourceCoeffs
    {
        fieldNames          (U);
        selectionMode       cellSet; // cellSet || points || cellZone
        cellSet             turbine;
        origin              (0 0 0);
        axis                (0 0 1);    // Negative for opposite rotation
        rotorRadius         0.5;
        freeStreamVelocity  (1 0 0);
        tipSpeedRatio       1.9;
        tsrAmplitude        0.19;       // Amplitude for TSR oscillation
        tsrPhase            1.9;        // Angle of first peak (rad)

        dynamicStall
        {
            active              on;
            dynamicStallModel   LeishmanBeddoesSGC;
            LeishmanBeddoesSGCCoeffs
            {
                Tp          1.7;        // Default = 1.7
                Tf          3.0;        // Default = 3.0
                TAlpha      6.25;
                alphaDS0DiffDeg 3.8;
                r0          0.01;
                Tv          11;
                Tvl         8.7;
                B1          0.5;
                eta         0.98;
                E0          0.16;
                // Uncomment lists below to disable automatic calculations
                // ReList      (4e4 8e4 1.6e5 3.6e5 7e5 1e6 2e6 5e6);
                // CNAlphaList (3.2397 4.7255 5.2274 5.6084 5.8048 5.8904 5.9625 6.2771);
                // CD0List     (0.0232 0.0177 0.0139 0.0111 0.0094 0.0089 0.0082 0.0078);
                // CN1List     (0.34311 0.57438 0.72628 0.87407 0.97478 1.0264 1.1324 1.2367);
                // alpha1List  (7.7466 9.0006 10.2013 11.3078 12.1635 12.6109 13.7035 14.0118);
                // S1List      (0.70707 1.2121 1.8182 2.1212 2.4242 2.5253 2.8283 4.2424);
                // S2List      (1.5152 2.4242 3.7374 5.1515 5.8586 6.1616 6.6667 6.6667);
            }
        }

        flowCurvature
        {
            active              on;
            flowCurvatureModel  Goude; // Goude || MandalBurton
        }

        blades
        {
            blade1
            {
                writePerf   true;
                writeElementPerf true;
                nElements   14;
                endEffects  on;
                elementProfiles (NACA0021);
                elementData
                ( // axialDistance, radius, azimuth, chord, chordMount, pitch
                    (-0.5 0.5 0.0 0.14 0.5 0.0)
                    ( 0.5 0.5 0.0 0.14 0.5 0.0)
                );
            }
            blade2
            {
                $blade1;
                writePerf   false;
                writeElementPerf false;
                azimuthalOffset 120.0; // Degrees
            }
            blade3
            {
                $blade2;
                azimuthalOffset 240.0;
            }
        }

        struts
        {
            strut1
            {
                writePerf   true;
                nElements   6;
                elementProfiles (NACA0021);
                elementData
                ( // axialDistance, radius, azimuth, chord, chordMount, pitch
                    (0.0 0.05 0.0 0.14 0.3 0.0)
                    (0.0 0.5 0.0 0.14 0.3 0.0)
                );
            }
            strut2
            {
                $strut1;
                writePerf   false;
                azimuthalOffset 120.0;
            }
            strut3
            {
                $strut2;
                azimuthalOffset 240.0;
            }
        }

        shaft
        {
            nElements   20;
            elementProfiles (cylinder);
            elementData
            ( // axialDistance, diameter
                (-0.66 0.09)
                ( 0.66 0.09)
            );
        }

        profileData
        {
            NACA0021
            {
                tableType   singleRe; // singleRe (default) || multiRe
                Re          1.6e5; // For tableType = singleRe
                data // For tableType = singleRe
                (   // alpha C_l C_d
                    #include "../../resources/foilData/NACA0021_1.6e5"
                );
                ReList // For tableType = multiRe
                (
                    #include "../../resources/foilData/NACA0021_multiRe_Re"
                );
                clData // For tableType = multiRe
		        (
                    #include "../../resources/foilData/NACA0021_multiRe_cl"
                );
                cdData // For tableType = multiRe
		        (
                    #include "../../resources/foilData/NACA0021_multiRe_cd"
                );
            }
            cylinder
            {
                data ((-180 0 1.1)(180 0 1.1));
            }
        }
    }
}

// ************************************************************************* //
